package com.wsjzzcbq.qianyuan.sys.job;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * DemoJob
 *
 * @author wsjz
 * @date 2022/03/22
 */
public class DemoJob extends QuartzJobBean {

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME;
        String now = formatter.format(LocalDateTime.now());
        System.out.println(now + " : demo job" + Thread.currentThread().getName());
    }
}
